﻿<Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:BloodGlucoseManagerApplication="clr-namespace:BloodGlucoseManagerApplication"
    xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms" 
    x:Class="BloodGlucoseManagerApplication.MainWindow"
    Title="Blood Glucose Manager" Height="573" Width="813" Initialized="Window_Initialized" Loaded="Window_Loaded"   
    
    >
    <Window.Resources>
        <BloodGlucoseManagerApplication:ZoomConverter x:Key="ZoomConv"/>

    </Window.Resources>
    <DockPanel LastChildFill="True" Background="DimGray">
        <Menu Height="22" Margin="0,0,0,0" x:Name="menu1" VerticalAlignment="Top" Foreground="Black" DockPanel.Dock="Top">
            <MenuItem Header="_File">
                <MenuItem Header="_New" x:Name="NewButton" Click="NewButton_Click" />
                <MenuItem Header="_Open" x:Name="OpenButton" Click="OpenButton_Click" />
                <MenuItem Header="_Print" x:Name="PrintButton" Click="PrintButton_Click" />
                <MenuItem Header="E_xit" x:Name="ExitButton" Click="ExitButton_Click" />

            </MenuItem>
            <MenuItem Header="_Edit"/>
            <MenuItem Header="_Help"/>
        </Menu>

        <StatusBar Height="23" Margin="0,0,0,0" x:Name="statusBar" VerticalAlignment="Bottom" DockPanel.Dock="Bottom"/>

        <Border x:Name="borderToolBox" Width="160" HorizontalAlignment="Left" BorderThickness="1" BorderBrush="Black" Margin="0,0,0,0" DockPanel.Dock="Left" Background="#FF000000">
            <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
                <StackPanel x:Name="toolboxStackPanel" Background="LightGray" Height="auto">
                    <Label Background="Gray" Foreground="LightGray" Width="Auto" Content="Toolbox"/>
                    <Expander IsExpanded ="True" Header ="Measurement devices">
                        <Border Margin ="3" Padding ="5" Background ="#77FFFFFF" BorderBrush ="DimGray" BorderThickness ="1">
                            <StackPanel HorizontalAlignment="Center">
                                <ComboBox x:Name="comboboxMeasurementDevices" IsSynchronizedWithCurrentItem="True" Width="130" Height="23"/>
                                <Button Height="23" x:Name="buttonUpload"  Width="75" Margin="3" Click="buttonUpload_Click" Content="Upload"/>
                            </StackPanel>
                        </Border>
                    </Expander>
                    <Expander IsExpanded ="True" Header ="Data presentation">
                        <Border Margin ="3" Padding ="5" Background ="#77FFFFFF" BorderBrush ="DimGray" BorderThickness ="1">
                            <StackPanel HorizontalAlignment="Center" x:Name="dataPresenterStackPanel">
                                <GroupBox  Header="Timespan">
                                    <Grid Height="Auto" Width="125">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="Auto"/>
                                            <ColumnDefinition Width="*" />
                                        </Grid.ColumnDefinitions>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto"/>
                                            <RowDefinition Height="Auto" />
                                            <RowDefinition Height="Auto" />
                                        </Grid.RowDefinitions>
                                        <Label Content="From"/>
                                        <WindowsFormsHost  Grid.Column="1" >
                                            <wf:DateTimePicker x:Name="fromDatePicker" Width="90"/>
                                        </WindowsFormsHost>
                                        <!--<Microsoft_Samples_KMoore_WPFSamples_DateControls:DatePicker  ToolTip="From" x:Name="fromDatePicker"  Grid.Column="1" Width="90" CanEdit="False" />-->
                                        <Label Content="To" Grid.Row="1"/>
                                        <!--<Microsoft_Samples_KMoore_WPFSamples_DateControls:DatePicker   ToolTip="To" x:Name="toDatePicker" Grid.Row="1" Grid.Column="1" Width="90"/>-->
                                        <WindowsFormsHost  Grid.Column="1" Grid.Row="1" >
                                            <wf:DateTimePicker x:Name="toDatePicker" Width="90"/>
                                        </WindowsFormsHost>
                                        <CheckBox  Content="Only weekdays" Name="checkOnlyCheckBox" Grid.Row="2" Grid.ColumnSpan="2" HorizontalAlignment="Center" />
                                    </Grid>
                                </GroupBox>
                            </StackPanel>
                        </Border>
                    </Expander>
                    <ComboBox Text="{Binding Path=Value, Converter={StaticResource ZoomConv}, ElementName=canvasZoomSlider}"
                    	Background="WhiteSmoke" Width="60" IsEditable="True" VerticalAlignment="Center">
                        <ComboBoxItem Content="25%"/>
                        <ComboBoxItem Content="50%"/>
                        <ComboBoxItem Content="75%"/>
                        <ComboBoxItem Content="100%"/>
                        <ComboBoxItem Content="200%"/>
                        <ComboBoxItem Content="300%"/>
                        <ComboBoxItem Content="400%"/>
                        <ComboBoxItem Content="500%"/>
                    </ComboBox>
                    <Slider x:Name="canvasZoomSlider" Orientation="Horizontal" Minimum="0.25" VerticalAlignment="Center" Maximum="5" Value="1" Width="80" ValueChanged="canvasZoomSlider_ValueChanged"  />


                </StackPanel>
            </ScrollViewer>
        </Border>
        <!--<ScrollViewer Width="auto" Height="auto" HorizontalScrollBarVisibility="Visible" VerticalScrollBarVisibility="Auto" Focusable="False">-->
            <Border>
                <!--<Border.LayoutTransform>
                    <ScaleTransform ScaleX="{Binding Path=Value, ElementName=canvasZoomSlider}" ScaleY="{Binding Path=Value, ElementName=canvasZoomSlider}" x:Name="canvasZoomTransform"/>
                </Border.LayoutTransform>-->
                <TabControl Width="Auto" Height="Auto" x:Name="ContentTabs" SelectionChanged="ContentTabs_SelectionChanged"/>

            </Border>
        <!--</ScrollViewer>-->


    </DockPanel>
</Window>
